<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>定位</title>
    <style>
    .box{
        width: 100px;
        height: 100px;
        background-color: gold;
        margin: 50px auto 0;
        border-radius: 12px;
        position: relative;
    }
    .box .num{
        width: 28px;
        height: 28px;
        background-color:red;
        color: #ffffff;
        line-height: 28px;
        text-align: center;
        position: absolute;
        top: -14px;
        right: -14px;
        border-radius: 50%;
    }
    </style>
</head>
<body>
    <div class="box">
        <div class="num">5</div>
    </div>
</body>
</html>